<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dbtest/logisticsites/charge_agv.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demoproject/logisticsites/charge_agv.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'agvName',
                footer: "Foots",
                cnName: 'AGV电量信息',
                name: 'logisticsites/charge_agv',
                newTabEdit: false,
                url: "/charge_agv/",
                sortName: "agvName"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"agvName":"","isCharge":""});
            const searchFormOptions = ref([[{"title":"AGV小车","field":"agvName"},{"dataKey":"enable","data":[],"title":"充电","field":"isCharge"}]]);
            const columns = ref([{field:'agvName',title:'AGV小车',type:'string',sort:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'voltage',title:'电压',type:'decimal',width:110,align:'left'},
                       {field:'electricity',title:'电量',type:'decimal',width:110,align:'left'},
                       {field:'isCharge',title:'充电',type:'sbyte',bind:{ key:'enabled',data:[]},width:110,align:'left'},
                       {field:'datetime',title:'时间',type:'datetime',width:110,align:'left'}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
